package com.rightsidetech.system.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;

@Data
public class ActivityMaterialAddReq implements Serializable {

    @ApiModelProperty("标题")
    @Pattern(regexp = "^[\\u4e00-\\u9fa50-9a-zA-Z]{0,}$", message = "标题不能包含特殊符号")
    @NotBlank(message = "标题不能为空")
    @Length(max = 50,message = "标题长度过长")
    private String title;

    @ApiModelProperty("对象: 1代理商 2 门店 3全部")
    @NotNull(message = "对象不能为空")
    @Min(value = 1,message = "对象参数错误")
    @Max(value = 3,message = "对象参数错误")
    private Byte target;

    @ApiModelProperty("文件集合")
    private List<ActivityFileReq> fileReqs;

}